Skip to content

Latest commit

 

History

History
48 lines (34 loc) · 1.62 KB

File metadata and controls

48 lines (34 loc) · 1.62 KB

HTML Elements:

elements are defined using tags. Screenshot (497)

Block Elements:
Takes up the full width available, and force a line break (before and after it).

  Ex: <div>,<p>,<h1>…<h6>,<ul>,<li>,<table>

Inline Elements:
Takes up only as much width as necessary, and does not force any line break.

Ex: <span>, <a></a>, <img>, <iframe>

note: You can nest inline elements inside block elements but not the other way around.

💡 more about html elements

tip: The most important block element in HTML is the division element (<div></div>). This element is heavily used and sometimes whole websites or web apps only consist of divisions. The division forces a line break and is often used as a container of other divisions or other HTML elements.
The counterpart to division is the inline element (<span></span>). As we learned, inline elements don’t force a line break and hence, divide the content into logical parts.

tip: div and span are non-semantic tags, but their amazing application is use “they are used for structuring the html document”.

tip: “ in html5 block elements are roughly flow elements, and inline elements are roughly phrasing elements. ”